Skip to content

Fix SQLite statement ownership - #237

Merged
noise64 merged 5 commits into
mainfrom
fix-sqlite-statements
Nov 27, 2026
Merged

noise64 merged 5 commits into
mainfrom
fix-sqlite-statements

Conversation

@noise64

@noise64 noise64 commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor
  • delivers the statement-ownership slice of GOL-1947, stacked on Switch node_compat to Node 26.13.1 #218 (which now includes Fix SQLite prepare and value contracts [skip ci] #231); does not close the broader migration/consumer work
  • retains real prepared SQLite handles, statement close/disposal, actual SQLite statistics, cursor cleanup and execution/finalization reentry guards
  • keeps replacement contracts separate: Node deserialize() finalizes statements before attempting replacement, including later failure; recovery restoreDatabaseSync() preserves the connection, UDFs and idle statements/options, rejecting active execution/cursors before mutation
  • preserves Node 26's shared-statement reset on a stale iterator's return() without clearing a newer iterator's recovery guard; adds public lifetime, statistics, deserialize and asymmetric recovery regressions
  • ordinarily merges published Fix SQLite prepare and value contracts [skip ci] #231 d3e9d832 without conflicts. The repair ignores hidden named-binding properties, preserves native bind-error messages and consumes throwing-UDF exceptions at the exec() boundary instead of leaking them into later failures; regressions cover get/all/iterate/run and reuse after failure. Regenerates four missing DTS entries for existing statement-test exports
  • ordinarily merges current Switch node_compat to Node 26.13.1 #218 df908bf7 (including main a57ed896) at 4e0d9b0c, entirely automatically. All six ownership implementation/test files are byte-identical to published 6a3310eb; the diff against the new base remains the original seven ownership-only files. No new behavior/design change or classification promotion is authored in this integration

Node compatibility

Actual #218 base df908bf7 → candidate 4e0d9b0c: classifications unchanged, 3200 runnable / 1299 known gaps, primary 3200/4499 (71.1%), full public 3200/9654 (33.1%), total 10794. SQLite 32 runnable / 27 known gaps / 117 total. Config/report are byte-identical to the new base and the prior #237 head. These are classification inventories, not a new-head full-suite pass. No vendored edits or classification promotions are included.

Validation and limits

  • exact integration 4e0d9b0c: SQLite runtime 18 passed, configured SQLite compatibility 32 passed / 107 ignored, process features 1 passed; preinit host-service denial (including SQLite open) and deferred-open/restored-filesystem controls 1 passed each; report currentness 1 passed, SQLite DTS 1 passed. All-target Clippy (-Dwarnings), all five skeleton Clippy lanes, fmt and diff checks exited 0; Cargo manifest warnings remain. Head/tree/clean state were checked before and after every command; generated runtime/compat SQLite native/JS bytes and runtime fixture match the candidate. Focused author self-review found no integration defect; direct integration assessment is COMPLETE/CLEAR, with hashes/source identities verified (nov27-237-4e0d9b0c-local-integration, rev2). Published head/base reconciliation is recorded in golem-review (nov27-237-4e0d9b0c-published-reconciliation, rev1), with zero open concerns and no new approval. Exact-head CI 46002953295 completed successfully: all 28 executed validation jobs passed, including runtime/Node/P3, stock/fork optimizer, build, quality and report lanes; publish/release jobs and separate Proof were skipped. No repair or rerun was needed. Prior-head checks and CI below remain historical
  • historical integrated repair 6a3310eb: SQLite runtime 18 passed, configured SQLite compatibility 32 passed / 109 ignored; all-target build/Clippy (-Dwarnings), formatting, five skeleton Clippy lanes and dev-tool format/lint/TypeScript pass. Generated runtime/compat native and JS source bytes match that candidate. Report tests 37 passed / 1 generator ignored and SQLite DTS 1 passed preceded only the two-file UDF correction; their inputs are unchanged
  • binding regression fixture before adding the UDF sequence: unchanged merged implementation 16 passed / 2 failed (hidden matching getter invoked; SQLite error 25 reported as unknown error), repaired implementation 18 passed. The final fixture separately fails unchanged 2fa14e2c with a stale UDF sentinel instead of bind error 25, then passes with the exec() correction. Pinned Node 26.13.1 passes the full number-binding fixture and identical final lifetime prefix through all four excess-positional controls, not the runtime-specific iterator assertions. Missing DTS entries were independently reproduced, regenerated and normally rechecked
  • include-ignored diagnostics on 2fa14e2c remain failures: statement suites 18 passed / 4 failed (expandedSQL, iterate, setReadBigInts, persistent options); named-parameter suites 2 passed / 1 failed (setter argument-name message). These were not rerun after the UDF-only correction and are not a full-suite pass or blanket parity claim. Earlier broader SQLite diagnostic 76 passed / 63 failed belongs to the pre-intrinsic-deserialize-fix source, not this candidate; TagStore/UDF-close and broader database/session/metadata gaps remain
  • historical pinned Node lifetime/statistics/deserialize controls: 3 passed; original unchanged-code, intrinsic-accessor and stale-return reds retain their source bindings and are not relabeled as new final-fixture reds. Early cross-worktree cached-generator attempts remain excluded
  • historical author-run Golem qualification used consumer 3a9c8ac96d90f7ba59765bcae4f458d2b1185daa and the included older 4bece465 SQLite implementation: both unchanged SqliteSnapshotAgent recovery/replay tests and an added custom-snapshot control passed, requiring successful snapshot-loaded events. Controls cover idle handles/options, schema changes, UDF preservation, active cursor/callback refusal without mutation, replay and continued writes. The three tests reran with the older stale-return repair; those local runtime sequences were not added to the consumer assertions. Automatic typed snapshots still exclude statement objects
  • no current-head Golem consumer/recovery, host durability or shipped-artifact qualification is claimed; no local full Node/fork sweep was run. Historical Golem results used locally built source-bound fixtures, not shipped artifacts, all consumers or the full Golem suite. The initial custom-test filesystem-wait mistake was a corrected harness error, not a product red. Original precommit provenance and initial missing-WASI_SDK_PATH skeleton-check qualifications remain; successful lanes used /opt/wasi-sdk
  • historical CI 45808953727 completed successfully on 6a3310eb: all 28 executed validation jobs passed; release/publish skipped. No manual rerun. This validates that prior candidate independently of upstream Fix SQLite prepare and value contracts [skip ci] #231's successful CI45802967730, not the latest integration
  • the authorized trivial integration-only update does not require renewed owner/Vigoo approval; it creates no new approval and does not authorize merging this PR into Switch node_compat to Node 26.13.1 #218 while sibling updates run. No crypto/DH, zstd, NJ-03 or backend-policy changes

@noise64
noise64 marked this pull request as ready for review November 25, 2026 22:50
@noise64
noise64 marked this pull request as draft November 26, 2026 07:51
@noise64
noise64 marked this pull request as ready for review November 26, 2026 11:43

@vigoo vigoo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the statement-ownership delta against #231 at d3e9d83, with head 6a3310e. No blocking findings in correctness or maintainer assessment. Checked ownership/finalization, callback reentry guards, iterator invalidation, binding reuse, statistics, and the distinct deserialize/recovery contracts. Local native-source controls and shared Node 26.13.1 controls passed; exact-head CI also passed. This does not qualify current-head Golem consumer recovery or shipped artifacts.

@noise64
noise64 changed the base branch from fix-sqlite-value-contracts to node-26-target November 27, 2026 12:57
@noise64
noise64 changed the base branch from node-26-target to main November 27, 2026 14:30
@noise64
noise64 merged commit 73eb64c into main Nov 27, 2026
31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants